/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.chapter5.designpatters.structuralpattern.composite.compositeImpl;

import za.ac.cput.chapter5.designpatters.structuralpattern.composite.compositeinterface.Component;

/**
 *
 * @author Sakhe
 */
public class Leaf implements Component{
 
    String name;
    public Leaf(String name){
    this.name = name;
    }
    @Override
    public void sayHello(){
        System.out.println(name +": leaf says Hello");
    }
    @Override
    public void sayGoodbye(){
        System.out.println(name +": leaf says goodbye");
    }
}
